package com.hmy.finance.api.bo.core.request.enums;

import lombok.Getter;

/**
 * @author songkf
 */

@Getter
public enum ReceivableAdjustTypeEnum {

    /**
     * 运费
     */
    SHIPPING("1", "运费"),
    /**
     * 改装费
     */
    MODIFICATION("2", "改装费"),
    /**
     * 租金
     */
    RENT("3", "租金"),
    /**
     * 索赔
     */
    CLAIMS("4", "索赔");
    private final String value;
    private final String desc;

    ReceivableAdjustTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    /**
     * 根据value获取desc
     *
     * @param value value
     * @return desc
     * @author songkf
     */
    public static String getDescByValue(String value) {
        for (ReceivableAdjustTypeEnum businessBillTypeEnum : ReceivableAdjustTypeEnum.values()) {
            if (businessBillTypeEnum.getValue().equals(value)) {
                return businessBillTypeEnum.getDesc();
            }
        }
        return null;
    }
}
